package org.demon.springtest.aspect;

import org.aspectj.lang.annotation.After;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Before;
import org.springframework.stereotype.Component;

/**
 * @author demon
 * @version 1.0.0
 */
@Aspect
@Component
public class LogAspect {

    @After("execution(* org.demon.springtest.service.SayService.*(..))")
    public void log() {
        System.out.println("后置切面日志记录");
    }

    @Before("execution(* org.demon.springtest.service.SayService.*(..))")
    public void bLog(){
        System.out.println("前置切面日志记录");
    }
}
